package file;

import java.io.File;

public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        File file=new File("./test.txt");
        //boolean result=file.delete();
        //System.out.println(result);
        //进程结束时删除文件
        file.deleteOnExit();
        Thread.sleep(10000);
    }
}
